{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAACtCAYAAACz8sT0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xd4lGW+N/Dvb/ozT0kCCRBaEggl\ngIQqTWClHAwiVRQEpBcRFmnSOxp6TUIKurJrOx7OntXXI7rK4isroqsQfSmKVA8uLopoJpMJkOR+\n/0jwIAIpzMw95fe5rrl2r0yY5xvy+OWeZ+77fkgIAcYYY6HPJDsAY4wx/+DCZ4yxMMGFzxhjYYIL\nnzHGwgQXPmOMhQkufMYYCxNc+IwxFia48IMIEdmJ6DkiOkdELiLKJaIU2bkY8wYiSiKivxHRz0R0\nkogGyc4Uarjwg4sFwP8A6A4gAsBiAK8RUbzETIzdNSKyAHgdwJsAqgGYBOBFImosNViIIV5pG9yI\n6AsAK4QQ/yk7C2NVRUQtABwEoIuyUiKivwL4WAixRGq4EMIj/CBGRDUBNAZwVHYWxnyAALSQHSKU\ncOEHKSKyAngJwC4hxJey8zB2l74CcBHAXCKyEtG/ofTSpVNurNDCl3SCEBGZALwMwAAwQAhxTXIk\nxu4aEbUEsB2lo/pPAXwP4IoQYrzUYCHEIjsAqxwiIgDPAagJoC+XPQsVQogvUDqqBwAQ0QEAu+Ql\nCj1c+MFnB4AkAL2EEB7ZYRjzlrIR/gmUXmqeCiAWwAsyM4UavoYfRIgoDsBkAK0AfEdE+WWPEZKj\nMeYNowBcQOm1/J4AegshrsiNFFr4Gn4AoxW0BMBy/Pof5hIAy8QysVpKKMa8gW5/bkPwue0rPMIP\nbIcBFPzqKwIFAHKlpGHMew6Lm89t8Lnta1z4gW0PriEXVwECwVR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hjYYILnzHGwsT/Bximtpm7KLgBAAAAAElFTkSu\nQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fce52c5e4e0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import sys\n",
    "\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "from fealpy.functionspace import LagrangeFiniteElementSpace\n",
    "from fealpy.mesh.TriangleMesh import TriangleMesh\n",
    "\n",
    "degree = 3\n",
    "\n",
    "point = np.array([\n",
    "    [0,0],\n",
    "    [1,0],\n",
    "    [1/2,np.sqrt(3)/2]], dtype=np.float)\n",
    "cell = np.array([[0, 1, 2]], dtype=np.int)\n",
    "\n",
    "mesh = TriangleMesh(point, cell)\n",
    "V = LagrangeFiniteElementSpace(mesh, degree)\n",
    "ldof = V.number_of_local_dofs()\n",
    "ipoints = V.interpolation_points()\n",
    "cell2dof = V.dof.cell2dof\n",
    "\n",
    "fig, axes = plt.subplots(1, 2)\n",
    "mesh.add_plot(axes[0], cellcolor='w')\n",
    "mesh.find_point(axes[0], showindex=True, fontsize=12, color='g', markersize=25)\n",
    "#axes[0].set_title('local vertices indices', y=1)\n",
    "\n",
    "mesh.add_plot(axes[1], cellcolor='w')\n",
    "mesh.find_point(axes[1], point=ipoints[cell2dof[0]], showindex=True, fontsize=12, markersize=25)\n",
    "plt.savefig('/home/why/tridof4.pdf')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[ 0  4  6  8  5 16 17  7 18  9  1 10 12 11 19 13  2 14 15  3]]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAO4AAADuCAYAAAA+7jsiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxp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RU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fce90171e48>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "from fealpy.functionspace import LagrangeFiniteElementSpace\n",
    "from fealpy.mesh.TetrahedronMesh import TetrahedronMesh\n",
    "degree = 3\n",
    "\n",
    "point = np.array([\n",
    "    [0, 0, 0],\n",
    "    [1, 0, 0],\n",
    "    [0, 1, 0],\n",
    "    [0, 0, 1]], dtype=np.float)\n",
    "\n",
    "cell = np.array([[0, 1, 2, 3]], dtype=np.int)\n",
    "\n",
    "mesh = TetrahedronMesh(point, cell)\n",
    "V = LagrangeFiniteElementSpace(mesh, degree)\n",
    "ldof = V.number_of_local_dofs()\n",
    "ipoints = V.interpolation_points()\n",
    "cell2dof = V.dof.cell2dof\n",
    "print(cell2dof)\n",
    "\n",
    "fig = plt.figure()\n",
    "axes = fig.gca(projection='3d')\n",
    "mesh.add_plot(axes, alpha=1)\n",
    "mesh.find_point(axes, point=ipoints[cell2dof[0]], showindex=True, fontsize=12, color='r')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  },
  "latex_envs": {
   "bibliofile": "biblio.bib",
   "cite_by": "apalike",
   "current_citInitial": 1,
   "eqLabelWithNumbers": true,
   "eqNumInitial": 0
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
